Chris Pollett > Old Classes >
CS116a

( Print View )

Student Corner:
  [Grades Sec1]

  [Submit Sec1]

  [Email List Sec1]

  [
Lecture Notes]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












CS116a Fall 2004Practice Midterm 2

[Student generated solutions]

To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes three times. Second and third time try to see how huch you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) The midterm will be in class . (b) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (c) You should bring photo ID. (d) There will be more than one version of the test. Each version will be of comparable difficulty. (e) If your cell-phone or beeper goes off you will be excused from the test at that point and graded on what you have done till your excusal. (f) One problem (less typos) on the actual test will be from the practice test. (g) It covers material since the first midterm.

1. Suppose we are doing the scan-line polygon fill algorithm and we trying to compute the number of times a scan line intersects with our polygon. Suppose two edges of our polygon intersect at a point that is on this scan line. How do we handle this case. Be aware there is more than one case to consider for how the edges meet.

2. On HW 3 in your code, how did you compute the intensity value of a pixel and how did you use this intensity when actually drawing the pixel.

3. How is a sorted-edge table used in the scan line fill algorithm.

4. Briefly describe how the flood fill algorithm works.

5. Explain how to get the current pixel color using OpenGL query functions. Similarly, explain how to get the current model view stack size.

6. Write one matrix that does a 2D scaling by a factor of 5 about the point (1,2).

7. Give a pair of matrix operations that do not commute. Determine whether the points (1, 2, 1) and (-4, -8, -4) represent the same point in 2D homogeneous coordinates.

8. Suppose we want to undo a rotation about the point (2,1) by angle of 45 degrees. What would be a transformation that would do this?

9. Give a sequence of x, y, z rotations together with some translation that would allow one to perform a general rotation obout a point P in 3D homogeneous coordinates by an angle theta.

10. Suppose I want to rotate about the point ((1/2)^{1/2}, (1/2)^{1/2}, 0) by 45 degrees. What would be the quaternion needed to do this rotation and how would I use it?